import { http } from "@/utils/http";
import type { GraphDataType } from "@/views/graph/common/type";

export type ResultType = ReplaceTargetType<GraphDataType>;

export const querySpace = () => {
  return http.request<ResultType>({
    url: "/nebulaApi/space/querySpace",
    method: "get",
  });
};

export const entityQueryFast = (space: string) => {
  return http.request<ResultType>({
    url: "/nebulaApi/entity/entityQueryFast",
    method: "get",
    params: {
      space,
    },
  });
};
